.customer-service {
  position: fixed;
  bottom: 30px;
  right: 120px;
  z-index: 9999;
  font-family: '微软雅黑', Arial, sans-serif;
}

/* 客服图标样式 */
.service-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #fff;
  border-radius: 50%;
  padding: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  width: 80px;
  height: 80px;
  z-index: 9999;
}

.service-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.service-icon.active {
  background: #fa8c16;
  color: white;
}

/* 耳机图标样式 */
.headset-icon {
  position: relative;
  width: 40px;
  height: 30px;
  margin-bottom: 5px;
}

.headset {
  position: relative;
  width: 100%;
  height: 100%;
}

.earcup {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid currentColor;
  border-radius: 50%;
  top: 5px;
}

.earcup.left {
  left: 0;
}

.earcup.right {
  right: 0;
}

.band {
  position: absolute;
  width: 30px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 4px;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.microphone {
  position: absolute;
  width: 2px;
  height: 12px;
  background: currentColor;
  right: 15px;
  top: 15px;
  border-radius: 1px;
}

.arrow {
  position: absolute;
  font-size: 10px;
  color: #fa8c16;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  transition: transform 0.3s ease;
}

.service-icon.active .arrow {
  transform: translateX(-50%) rotate(180deg);
  color: white;
}

.service-text {
  font-size: 12px;
  font-weight: 500;
  margin-top: 5px;
}

/* 聊天窗口样式 */
.chat-window {
  position: absolute;
  bottom: 100px;
  right: 0;
  width: 350px;
  height: 500px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 聊天头部 */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(135deg, #fa8c16, #ff6b35);
  color: white;
}

.chat-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-icon {
  font-size: 20px;
}

.title-info h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.status {
  font-size: 12px;
  opacity: 0.9;
}

.status.online::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #4caf50;
  border-radius: 50%;
  margin-right: 4px;
}

.close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* 消息容器 */
.messages-container {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: #f8f9fa;
}

.messages-container::-webkit-scrollbar {
  width: 4px;
}

.messages-container::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.messages-container::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 2px;
}

/* 消息样式 */
.message {
  margin-bottom: 16px;
  display: flex;
}

.message.bot {
  justify-content: flex-start;
}

.message.user {
  justify-content: flex-end;
}

.message-content {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  position: relative;
}

.message.bot .message-content {
  background: white;
  border: 1px solid #e5e5e5;
  border-bottom-left-radius: 4px;
}

.message.user .message-content {
  background: #fa8c16;
  color: white;
  border-bottom-right-radius: 4px;
}

.message-text {
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 4px;
}

.message-time {
  font-size: 11px;
  opacity: 0.7;
  text-align: right;
}

/* 输入区域 */
.input-area {
  padding: 16px;
  background: white;
  border-top: 1px solid #e5e5e5;
}

.input-container {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.message-input {
  flex: 1;
  border: 1px solid #e5e5e5;
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 14px;
  resize: none;
  outline: none;
  transition: border-color 0.2s ease;
  font-family: inherit;
}

.message-input:focus {
  border-color: #fa8c16;
}

.send-btn {
  background: #fa8c16;
  color: white;
  border: none;
  border-radius: 20px;
  padding: 10px 20px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.send-btn:hover:not(:disabled) {
  background: #e55a2b;
}

.send-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* 快捷操作 */
.quick-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-btn {
  background: #f8f9fa;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #666;
}

.quick-btn:hover {
  background: #fa8c16;
  color: white;
  border-color: #fa8c16;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .chat-window {
    width: 300px;
    height: 400px;
    bottom: 80px;
    right: 10px;
  }
  
  .service-icon {
    width: 60px;
    height: 60px;
    padding: 10px;
  }
  
  .headset-icon {
    width: 30px;
    height: 25px;
  }
}

/* 快捷回复样式 */
.quick-replies {
  padding: 16px;
  background: #f8f9fa;
  border-top: 1px solid #e5e5e5;
}

.quick-replies-title {
  font-size: 12px;
  color: #666;
  margin-bottom: 8px;
  font-weight: 500;
}

.quick-replies-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quick-reply-btn {
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #333;
  text-align: left;
  width: 100%;
}

.quick-reply-btn:hover {
  background: #fa8c16;
  color: white;
  border-color: #fa8c16;
  transform: translateX(4px);
}

/* 正在输入提示样式 */
.typing {
  background: white !important;
  border: 1px solid #e5e5e5 !important;
  border-bottom-left-radius: 4px !important;
  min-width: 60px;
}

.typing-dots {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  background: #999;
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typing {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
} 